package com.honglv.controller.admin;


import com.honglv.pojo.dto.UploadHotelDTO;
import com.honglv.pojo.result.Result;
import com.honglv.service.HotelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController("adminHotelController")
@Slf4j
@RequestMapping("/admin")
@Api("酒店相关接口")
public class HotelController {
    @Autowired
    private HotelService hotelService;

    /**
     * 管理员上传酒店
     * @param
     * @return
     */
    @PostMapping("/uploadHotel")
    @ApiOperation("上传酒店")
    public Result uploadHotel(@RequestBody UploadHotelDTO uploadHotelDTO){
        hotelService.upload(uploadHotelDTO);
        return Result.success();
    }

}
